/*
 * @Author: Bo Cai
 * @Mail: caibo0520@qq.com
 * @Date: 2021-11-20 14:39:30
 * @LastEditors: Bo Cai
 * @LastEditTime: 2021-12-22 15:59:44
 */
import request from '@/utils/request'

const api_name = '/edu-service/course'

export default {
  getPageList(page, limit, searchObj) {
    return request({
      url: `/edu-service/course-front/${page}/${limit}`,
      method: 'post',
      data: searchObj
    })
  },
  getCollectedPageList(page, limit, searchObj) {
    // 获取收藏的课程
    return request({
      url: `/edu-service/course-front/collected/${page}/${limit}`,
      method: 'post',
      data: searchObj
    })
  },
  getSubjectOne() {
    return request({
      url: `/edu-service/subject`,
      method: 'get'
    })
  },
  getCourseInfoVoById(id) {
    return request({
      url: `${api_name}/course-publish-info/${id}`,
      method: 'get'
    })
  },
  getCourseIdByVideoId(vid) {
    return request({
      url: `/edu-service/video/video-info/${vid}`,
      method: 'get'
    })
  },
  getCourseWebVoById(id) {
    return request({
      url: `/edu-service/course-front/${id}`,
      method: 'get'
    })
  }
}
